package com.kevin.enums;

//MDataTable 与 MDataRow SetState 的过滤选项
public enum BreakOp {
	//未设置，设置所有
	NONE(-1,"未设置"),
	//跳过设置值为Null的。
	NULL(0,"跳过Null"),
	//跳过设置值为空的。
	EMPTY(1,"跳过空"),
	//批量删除
	NULLOREMPTY(2,"批量删除");
	
	private Integer key;
	private String des;
	
	BreakOp(Integer key,String des) {
		this.key = key;
		this.des = des;
	}
	
    public static BreakOp valueofKey(Integer key) {
        for (BreakOp op : BreakOp.values()) {
            if (op.key.equals(key)) {
                return op;
            }
        }
        throw new IllegalArgumentException("No element matches " + key);
    }
    
    public Integer getKey() {
        return key;
    }
    
    public String getDes() {
        return des;
    }
}
